﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;

namespace Framework.Common.Serializer
{
    public class JsonSerializeHelper : SerializeBase<string>
    {
        static JavaScriptSerializer jss = new JavaScriptSerializer();

        public override string Serialize(object obj)
        {
            return jss.Serialize(obj);
        }

        public override bool SerializeToFile(object obj, string fullPath)
        {
            throw new NotImplementedException();
        }

        public override T DeSerialize<T>(string source)
        {
            return jss.Deserialize<T>(source);
        }

        public override T DeSerializeFromFile<T>(string fullPath)
        {
            throw new NotImplementedException();
        }
    }
}
